package hero.mps.web.class_course.service.impl;



import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import hero.mps.web.class_course.entity.ClassCourse;
import hero.mps.web.class_course.entity.ClassCourseVO;
import hero.mps.web.class_course.entity.ParamVO;
import hero.mps.web.class_course.mapper.ClassCourseMapper;
import hero.mps.web.class_course.service.ClassCourseService;
import org.springframework.stereotype.Service;

@Service
public class ClassCourseServiceImpl extends ServiceImpl<ClassCourseMapper, ClassCourse> implements ClassCourseService {
    @Override
    public IPage<ClassCourseVO> getClassCourseList(ParamVO param) {
        // 构建分页
        IPage<ClassCourseVO> page =new Page<>(param.getCurrentPage(), param.getPageSize());
        return this.baseMapper.getClassCourseList(page, param);
    }

    @Override
    public IPage<ClassCourse> getTeacherClassCourseList(ParamVO param) {
        // 构建分页
        IPage<ClassCourse> page =new Page<>(param.getCurrentPage(), param.getPageSize());
        return this.baseMapper.getTeacherClassCourseList(page, param);
    }
}
